<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page import="test.jndi.*,javax.naming.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    	               "http://www.w3.org/TR/html4/loose.dtd">

<html>
  <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    	<title>GlassFish JSP Page</title>
  </head>
  <body>
    <h1>Hello World!</h1>
    <%
    	Context initCxt = new InitialContext();
		MyBean myBean = (MyBean) initCxt.lookup("java:comp/env/bean2/MyBeanFactory");
		out.println("jndi out put value:" + myBean.getFoo());
    %>
    <br/>
    <%=myBean.getFoo() %>
    <br/>
    <%=myBean.getBar() %>
  </body>
</html> 
